#define DEBUG
#include <cv.h>
#include <highgui.h>

using namespace std;
using namespace cv;

IplImage *
sobel(const IplImage *src, IplImage *dst, int xorder, int yorder, int mask);

IplImage *
canny(const IplImage *src, IplImage *dst, double lowThesh, double highThresh, int mask);

IplImage *colorToBlack(IplImage *src);

IplImage *
smooth(IplImage *src, IplImage *dst, int smoothtype, int param1, int param2, double param3, double param4);

void pyDown(IplImage *src, IplImage *dst);

void pyUp(IplImage *src, IplImage *dst) ;

void roi();
int _roi(int, char**); 
void houghLine(Mat src, Mat dst, Mat cdst);
void threshold(IplImage *src);
int squares(int, char **);
int Sobel(int argc, char** argv);
int Coutour( int argc, char* argv[]);
int CannyHough(int argc, char** argv);
int HSV(int argc, char **argv);
int otsu(const IplImage *src_image); //大津法求阈值;
void outFindResult(char **imgSet, int cnt);
void liantong(IplImage**);
void begin(IplImage *);
void king_lk();
